package dj.ms.support.feign;

import com.dj.common.constants.FeignCliConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.core.annotation.AliasFor;

import java.lang.annotation.*;

/**
 * <br>
 * <p>
 * -
 * </p>
 *
 * <br>
 *
 * @author ZJG
 * @version 1.0
 * @date 2021/10/28 下午3:06
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@FeignClient(path = FeignCliConstants.PREFIX)
public @interface FeignAPIProvider {

    /**
     * This will be used as the bean name instead of name if present, but will not be used
     * as a service id.
     * @return bean name instead of name if present
     */
    @AliasFor(annotation = FeignClient.class)
    String contextId() default "";

    /**
     * @return The service id with optional protocol prefix.
     * value}.
     */
    @AliasFor(annotation = FeignClient.class)
    String name() default "";

    @AliasFor(annotation = FeignClient.class)
    Class<?>[] configuration() default {FeignConfiguration.class};

}
